echo "欢迎安装mc1.21.1java版"
echo "Welcome to install Minecraft 1.21.1 Java Edition."
echo ""
echo "作者 科技猫及唔必海盗船"
echo "Author Scicat and No need for pirate ship"
echo ""
echo "用途:学习研究"
echo "Purpose: study and research"
echo ""
echo "使用许可:学习研究"
echo "License: study and research"
echo ""
echo "本程序是为了测试mc的研究与适用性,切勿用作于非法用途"
echo "This program is to test the research and applicability of mc, and should not be used for illegal purposes"
echo ""
echo "十秒钟后开始安装，请阅读"
echo "---------------------------------------------------------"
sleep 10
echo "[*]开始安装"
pkg update && pkg upgrade -y
pkg install wget proot tar -y
pkg install openjdk-21 -y
wget https://gitee.com/scicat-team/termux-mc/raw/master/server.properties
wget https://gitee.com/scicat-team/termux-mc/raw/master/start.sh
wget -O purpur-1.21.1-2329.jar https://api.purpurmc.org/v2/purpur/1.21.1/2329/download
java -Xms1G -Xmx1G -jar purpur-1.21.1-2329.jar nogui
sed -i 's/eula=false/eula=true/g' eula.txt
sed -i 's/online-mode=true/online-mode=false/g' server.properties
rm -rf ./mc.sh
java -Xms1G -Xmx1G -jar purpur-1.21.1-2329.jar nogui